Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FFmpeg/FFV1
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 11c75cb5db19
Choose a base ref
...
head repository: FFmpeg/FFV1
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cfb65d420aaa
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 4, 2018

  1. Add get_bits() definition

    JeromeMartinez authored and michaelni committed Jan 4, 2018
    Copy the full SHA
    49a47b1 View commit details
  2. Change "current position" to "pointer"

    Github: Closes #91
    JeromeMartinez authored and michaelni committed Jan 4, 2018
    Copy the full SHA
    cfb65d4 View commit details
Showing with 6 additions and 2 deletions.
  1. +6 −2 ffv1.md
8 changes: 6 additions & 2 deletions ffv1.md
Original file line number Diff line number Diff line change
@@ -170,12 +170,16 @@ Several components of FFV1 are described in this document using pseudo-code. Not

#### remaining_bits_in_bitstream

`remaining_bits_in_bitstream( )` means the count of remaining bits after the current position in that bitstream component. It is computed from the `NumBytes` value multiplied by 8 minus the count of bits of that component already read by the bitstream parser.
`remaining_bits_in_bitstream( )` means the count of remaining bits after the pointer in that bitstream component. It is computed from the `NumBytes` value multiplied by 8 minus the count of bits of that component already read by the bitstream parser.

#### byte_aligned

`byte_aligned( )` is true if `remaining_bits_in_bitstream( NumBytes )` is a multiple of 8, otherwise false.

#### get_bits

`get_bits( i )` is the action to read the next `i` bits in the bitstream, from most significant bit to least significant bit, and to return the corresponding value. The pointer is increased by `i`.

# General Description

Samples within a plane are coded in raster scan order (left->right, top->bottom). Each sample is predicted by the median predictor from samples in the same plane and the difference is stored see [Coding of the Sample Difference](#coding-of-the-sample-difference).
@@ -648,7 +652,7 @@ log2_run[41]={ |
}; |
|
if (run_count == 0 && run_mode == 1) { |
    if (get_bits1()) { |
    if (get_bits(1)) { |
        run_count = 1 << log2_run[run_index]; |
        if (x + run_count <= w) |
            run_index++; |